package org.example.yiyu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;
import org.example.yiyu.model.User;

@Mapper
public interface LoginMapper  {

    @Select("SELECT * FROM user WHERE phone_number = #{phoneNumber}")
    User findByPhoneNumber(@Param("phoneNumber") String phoneNumber);

    @Insert("INSERT INTO user(phone_number, password) VALUES(#{phoneNumber}, #{password})")
    void insert(User user);
}
